<?php

use Illuminate\Database\Seeder;

class linkTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $data =[
            'link_name' => str_random(10),
            'link_title' => str_random(10),
            'link_url' => 'http://www.baidu.com',
            'link_order' => rand(0,10),
        ];
        $datas = [];
        for($i = 0;$i <= 10;$i ++)
        {
            $datas[] = $data;
        }
        DB::table('link')->insert($datas);
    }
}
